import axios from 'axios'

export function getPrintFields() {
  return axios({
    url: 'http://60.204.185.182:8081/jeecg-boot/print/getPrintTplFields?businessCode=purchaseprebill&tableName=jxc_purchase_pre_bill',
    method: 'get',
    //params: query
  })
}


/**
 * 保存或更新模板
 * @param {} params
 * @returns
 */
export function saveorUpdatePrintTpl(params) {
  return axios({
    url: 'http://60.204.185.182:8081/jeecg-boot/print/save-or-update-tpl',
    method: 'post',
    data: params
  })
}

/**
 * 获取模板
 * @param {} query
 * @returns
 */
export function getPrintTpl(query) {
  return axios({
    url: 'http://60.204.185.182:8081/jeecg-boot/print/get-tpl',
    method: 'get',
    params: query
  })
}
